package com.xuce.service.imp;

import com.xuce.dao.mapper.TUserMapper;
import com.xuce.dto.ResultBean;
import com.xuce.pojo.TUser;
import com.xuce.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 徐策
 * @date 2020/3/11 21:45
 */
@Service
public class UserServiceImpl implements IUserService {

    @Resource
    TUserMapper tUserMapper;

    @Override
    public ResultBean register(String addr, String password) {
        TUser user = new TUser();
        user.setEmail(addr);
        user.setPassword(password);
        //TODO 注入mapper
        tUserMapper.insert(user);
        System.out.println(user+"===================");
        return ResultBean.success("注册成功");
    }
}
